<?php

App::uses('AppModel', 'Model');

class User extends AppModel {
    
    public $belongsTo = array(
        'Client'
    );
    
    public $validate = array(
        'name' => array(
            'rule'    => 'notEmpty',
            'message' => 'Morate uneti Ime Korisnika'
        ),
        'password' => array(
            'rule'    => 'notEmpty',
            'message' => 'Morate uneti Lozinku'
        ),
        'email' => array(
            'unique' => array(
                'rule'    => 'isUnique',
                'message' => 'Za unetu e-mail adresu je već kreiran nalog'
            ),
            'email' => array(
                'rule'    => 'email',
                'message' => 'Unetu e-mail adresa nije validna'
            )
        )
    );
}

?>